/**HEADER********************************************************************
* 
* Copyright (c) 2008 Freescale Semiconductor;
* All Rights Reserved
*
* Copyright (c) 2004-2008 Embedded Access Inc.;
* All Rights Reserved
*
*************************************************************************** 
*
* THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESSED OR 
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  
* IN NO EVENT SHALL FREESCALE OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
* THE POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************
*
* $FileName: vsc7385.h$
* $Version : 3.8.2.1$
* $Date    : Feb-13-2012$
*
* Comments:
*
*  This file contains definitions that belongs to the vsc7385 L2 switch.
*
*END************************************************************************/
#ifndef _vsc7385_h_
#define _vsc7385_h_ 1


#define VSC_WRITE(r,v)            { int i; vsc_write(&r,v,#r);  for(i = 0; i < 200; i++) {} }
#define VSC_WRITE_WITH_DELAY(r,v) { int i; vsc_write(&r,v,#r);  for(i = 0; i < 20000; i++) {} }

#ifdef __cplusplus
extern "C" {
#endif


typedef struct vcs7385_struct {
   uchar    reserved1[0x1c040];
   uint_32  CTRL;
   uint_32  ADDR;
   uint_32  DATA;
   uint_32  reserved2;
   uint_32  GLORESET;
   uchar    reserved3[0xc];
   uint_32  CHIP_ID;
   uchar    reserved4[0xc];
   uint_32  ROM_MAP;
} VS7385_STRUCT, * VS7385_STRUCT_PTR;
   
boolean vsc7385_boot(void);


#ifdef __cplusplus
}
#endif

#endif

/* EOF */
